<style lang=less scoped>
	@import "../../variables.less";

	.index {
		position: absolute;
		top: 100px;
		right: 20px;
		bottom: 20px;
		width: 550px;
		display: flex;
		flex-direction: column;
		background-color: @mainBackground;
		padding: 8px;
		pointer-events: all;
	}
</style>
<template>
	<div style="height: 100%">
		<RouterView class="index" />
		<FloorSelector :dataset="floors" style="position: absolute;left: 100px;bottom:0;pointer-events: all" />
	</div>
</template>
<script lang=ts>
	import { Component, Vue } from "vue-property-decorator";
	import FloorSelector from "@/components/floorSelector/floorSelector.vue";
	import request from "@/request";



	@Component({
		components:{
			FloorSelector
		}
	})
	export default class MedicalDataIndex extends Vue {
		floors:{ name:string, id:number }[] = [];
		mounted(){
			request({
				url: "/space/floor/",
				params: {
					facility: 1
				}
			}).then(({ data }) => {
				this.floors = data.reverse().map((t:any) => ({
					name: t.name,
					id: t.id
				}));
			});
		}

	}

</script>
